from django.http import HttpResponse
from django.shortcuts import render


# Create your views here.
def index(request):

    if request.method == "GET":
        return render(request, "index.html")
    else:
        # 只要开启了中间件中csrf设置，django底层自动帮我们提取表单中的csrf和cookie中的csrf值进行对比校验
        return HttpResponse("csrftoken验证成功")